﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Logistics.Data
{
    public interface ITimeStamp
    {
        DateTime? UpdatedOnUtc { get; set; }

        DateTime CreatedOnUtc { get; set; }
    }

    public class TimeUtility
    {
        public static void UpdateTimeStamp(ITimeStamp o)
        {
            o.UpdatedOnUtc = DateTime.UtcNow;
        }

        public static void SetCreatedTimeStamp(ITimeStamp o)
        {
            o.CreatedOnUtc = DateTime.UtcNow;
        }
    }
}
